

import 'package:freezed_annotation/freezed_annotation.dart';

part 'WelcomeData.freezed.dart';
part 'WelcomeData.g.dart';
/* 输出：
{
  "id": 123,
  "name": "Taylor Swift",
  "image": "https://example.com/taylor.jpg",
  "followers": 10000000,
  "isVerified": true
}
*/
@freezed
abstract class WelcomeData with _$WelcomeData {
  const factory WelcomeData({
    required int id,
    required String name,
    String? image,
    required int followers,
    @JsonKey(name: "isVerified") required bool isVerified,
  }) = _WelcomeData;

  factory WelcomeData.fromJson(Map<String, dynamic> json) => _$WelcomeDataFromJson(json);

}